(1) Field of the Invention
The present invention relates to video data processing. More specifically, the present invention relates to a method and apparatus for removing video data from a video buffer partitioned into a plurality of data planes.
(2) Art Background
The increased use of personal computers for video-teleconferencing has created a demand for inexpensive, low-power video cameras capable of feeding digital video data directly into a personal computer. A low-cost video front-end including an image sensor, an analog-to-digital (A/D) converter and a digital signal processor (DSP) can be used to generate digital video data, but due to bandwidth and availability limitations on the video transmission path in the recipient computer, it is often necessary to store the digital video data in a buffer until the video transmission path in the personal computer becomes available.
To maintain image integrity, it is desirable to buffer video data on a field-by-field basis. Unfortunately, it is not always possible to determine at the time storage of a video field begins whether there will be sufficient buffer space to hold the complete video field. This is because field storage and retrieval operations are interleaved so that the amount of memory available to store a given video field increases as field storage is ongoing. If the available memory space does not increase sufficiently to permit storage of the complete video field, the field must be discarded and the buffer memory used to store the incomplete video field must be deallocated to allow storage of a subsequent field.
Matters become more complicated when color video is involved. When video data for a color image is buffered, it is often desirable to store values representing different qualitative aspects of the image in distinct regions of a video buffer referred to as "data planes". For example, in a YUV formatted video signal, a repeating sequence of Y, U and V values is presented for storage in the video buffer. The Y values represent image luminance and are stored in a "Y-plane" of the video buffer, and the U and V values represent image chrominance and are stored, respectively, in a "U-plane" and a "V-plane" of the video buffer. After an entire video field has been received, the Y-plane contains all of the Y-values of the video field, and the U and V planes contain all of the U-values and V-values of the video field.
FIG. 1 illustrates a prior art method for draining a video buffer 100 partitioned into Y, U and V data planes 105, 110 and 115. After a complete video field of Y, U and V values has been stored in video buffer 100, the buffer 100 is drained one complete plane after another starting with the Y data plane and then continuing to the U and V data planes. A pointer element referred to as a "read pointer" is used to indicate the next location in the video buffer 100 to be read and is represented by arrow 120. The hashed area 125 of video buffer 100 represents the remainder of the values making up the video field and the non-hashed area 126 represents the portion of video buffer 100 already drained.
The primary disadvantage of the prior art buffer-drain technique is that the opportunity to concurrently drain one field and store another is limited. When a new video field is received for storage in buffer 100, the Y plane 105 is available to store incoming Y values and the U plane 110 is available to store at least some of the U-values. However, since V plane 115 is filled with data from a previous field, V-values from the new field cannot yet be stored. Since each line of video data output by the video front-end typically includes Y, U and V data, the inability to store V data means that the new field must be discarded. In fact, using the prior art technique, incoming video fields must continue to be discarded until the Y and U planes have been fully drained and the V plane at least partially drained.
One consequence of the reduced opportunity to concurrently drain and store video fields is an increase in the time between storage of successive fields. Increased time between storage of successive fields translates directly to lower data throughput and reduced buffer bandwidth.
Of course, increased concurrency between drain and store operations could be realized by increasing the size of buffer 100 so that at least two complete video fields could be stored in buffer 100 at once, but this would significantly increase the cost of the video camera.
Therefore, it is desirable to provide a method for draining a planarized buffer that maximizes the concurrency of field storage and retrieval operations to increase data throughput and increase buffer bandwidth, but without requiring the size of the buffer memory to be increased. This is accomplished by the method and apparatus of the present invention.